import { axios } from "@/utils/request";
// 用户聊天列表
export const searchDemand1 = (customerId: number) => {
  return axios({
    url: `/chat/contacts?customerId=${customerId}`,
    method: "get",
  });
};
// 服务人员聊天列表
export const searchDemand2 = (servicePersonId: number) => {
  return axios({
    url: `/chat/contacts?servicePersonId=${servicePersonId}`,
    method: "get",
  });
};
//获取消息
export const getMessage = (conversationId: string, userId: number) => {
  return axios({
    url: `/chat/history/${conversationId}?userId=${userId}`,
    method: "get",
  });
};
//发送消息
export const customerSendMessage = (params: any) => {
  return axios({
    url: `/chat/send`,
    method: "post",
    data: params,
  });
};
